#ifndef GLOBALERROR_H
#define GLOBALERROR_H

#include <QObject>
#include <QMessageBox>
#include <QApplication>
#include <QThread>

/*-------------------------------------------------------------------------------------------
--
--	CLASS: GlobalError
--
--	Date: April 5, 2010
--
--	REVISIONS (Date and Description):
--
--	DESIGNER: Erick Ribeiro
--
--	PROGRAMMER: Erick Ribeiro
--
--  INTERFACE: class GlobalError : public QObject
--
--  RETURNS: N/A
--
--	NOTES: Program class for the window GUI that handles error messages and various
--         functions that this class calls based on what the type of error was.
--
-------------------------------------------------------------------------------------------*/
class GlobalError : public QObject
{
Q_OBJECT

private:
    GlobalError ();
    static GlobalError * instance;

public slots:
    void displayError (QString errorTitle, QString errorMsg, bool critical);

public:
    // Call this method once from the GUI thread
    static void initInstance ();

    // Use these methods to display errors
    static void critical (const char errorMsg[], int exitCode);
    static void warning (const char errorMsg[]);
};

#endif // GLOBALERROR_H
